#include<stdio.h>
int main()
{
    int a;
	long int b; 
	b=0; 
	printf("请输入一串字符\n"); 
	while((a=getchar())!='\n')
	{
	    switch(a)
	  {
		case'1':++b;break;
		case'2':++b;break;
		case'3':++b;break;
		case'4':++b;break;
		case'5':++b;break;
		case'6':++b;break;
		case'7':++b;break;
		case'8':++b;break;
		case'9':++b;break;
		case'0':++b;break;
		default:break; 
	  }
    }
    printf("字符串中有%d数字\n",b);
    return 0;
}